import request from '@common/utils/request';

// 获取企业列表
export function getTenantList(params) {
  return request({
    url: '/tenant/list',
    method: 'post',
    data: params,
  });
}

// 新增企业
export function addTenant(params) {
  return request({
    url: '/tenant/create',
    method: 'post',
    data: params,
  });
}

// 修改企业
export function updateTenant(params) {
  return request({
    url: '/tenant/update',
    method: 'post',
    data: params,
  });
}

// 删除企业
export function deleteTenant(params) {
  return request({
    url: '/tenant/deleteById',
    method: 'post',
    data: params,
  });
}

// 模板创建合同流程
export function createFlowsByTemplates(params) {
  return request({
    url: '/tenant/createFlowsByTemplates',
    method: 'post',
    data: params,
  });
}

// 撤销签署流程
export function channelCancelFlow(params) {
  return request({
    url: '/tenant/channelCancelFlow',
    method: 'post',
    data: params,
  });
}

// 终止合同
export function stopContract(params) {
  return request({
    url: '/tenant/stopContract',
    method: 'post',
    data: params,
  });
}

// 用工单位人员派遣详情
export function sendWorkerRecord(params) {
  return request({
    url: '/tenant/sendWorkerRecord',
    method: 'post',
    data: params,
  });
}
